﻿<%@ Page Title="Login" Language="C#" MasterPageFile="~/Pages/Site.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Altairis.MailToolkit.ListManager.Pages.Login" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="server">
    <asp:LoginView runat="server">
        <AnonymousTemplate>
            <h1><asp:Localize runat="server" Text="Login" /></h1>
            <asp:Login runat="server" RenderOuterTable="false" FailureText="<blockquote><p>Access denied. Authentication failed.</p></blockquote>" ID="LoginControl" OnAuthenticate="LoginControl_Authenticate">
                <LayoutTemplate>
                    <asp:Literal runat="server" ID="FailureText" EnableViewState="False" />
                    <div class="form">
                        <p>
                            <asp:Label runat="server" AssociatedControlID="UserName" ID="UserNameLabel" Text="User name:" />
                            <asp:RequiredFieldValidator runat="server" ControlToValidate="UserName" ErrorMessage="User name is missing" ValidationGroup="LoginControl" Display="None" />
                            <br />
                            <asp:TextBox runat="server" ID="UserName" />
                        </p>
                        <p>
                            <asp:Label runat="server" AssociatedControlID="Password" ID="PasswordLabel" Text="Password:" />
                            <asp:RequiredFieldValidator runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ValidationGroup="LoginControl" Display="None" />
                            <br />
                            <asp:TextBox runat="server" TextMode="Password" ID="Password" />
                        </p>
                        <div class="buttons">
                            <asp:ValidationSummary runat="server" ValidationGroup="LoginControl" />
                            <asp:Button runat="server" CommandName="Login" Text="Submit" ValidationGroup="LoginControl" ID="LoginButton"></asp:Button>
                        </div>
                    </div>
                </LayoutTemplate>
            </asp:Login>
        </AnonymousTemplate>
        <LoggedInTemplate>
            <h1><asp:Localize runat="server" Text="Access denied" /></h1>
            <p>
                <asp:Localize runat="server" Text="You are not authorized to use this page." />
            </p>
        </LoggedInTemplate>
    </asp:LoginView>
</asp:Content>
